<?php

namespace application\controller\cp;

use application\controller\cp\BaseController;
use application\service\DataService;

class DataController extends BaseController {

    private $dataService;

    public function __construct() {
        parent::__construct();
        $this->dataService = new DataService();
        $this->view->layout = '/layout/main';
    }

    /**
     * @module
     * @comment(Danh sách bảng trong database)
     * @mapping(value=cp/database.html)
     */
    public function grid() {
        $this->view->tables = $this->dataService->getTable();
        $this->view->databsae = $this->dataService->getDatabase();
        $this->view->render("/database/grid");
    }

}
